﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                    xmlns:toolkitPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"
                    mc:Ignorable="d">

    <SolidColorBrush x:Key="HotListLightBrush" Color="#FFBEBEBE" />
    <ControlTemplate x:Key="PhoneScrollbarThumb" TargetType="Thumb">
        <Rectangle Width="{TemplateBinding Width}"
                   Height="{TemplateBinding Height}"
                   Fill="{StaticResource HotListLightBrush}"
                   IsHitTestVisible="False" />
    </ControlTemplate>

    <Style x:Key="KDScrollBarStyle" TargetType="ScrollBar">
        <Setter Property="Background" Value="{StaticResource PhoneDisabledBrush}" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="MinWidth" Value="5" />
        <Setter Property="MinHeight" Value="5" />
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid>
                        <Grid x:Name="VerticalRoot"
                              Width="{TemplateBinding Width}"
                              Background="Transparent">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <RepeatButton x:Name="VerticalSmallDecrease" Visibility="Collapsed" />
                            <RepeatButton x:Name="VerticalLargeDecrease"
                                          Grid.Row="1"
                                          Width="0"
                                          Template="{x:Null}" />
                            <Thumb x:Name="VerticalThumb"
                                   Grid.Row="2"
                                   Width="{TemplateBinding Width}"
                                   MinHeight="72"
                                   Margin="{TemplateBinding Padding}"
                                   Background="{TemplateBinding Background}"
                                   Template="{StaticResource PhoneScrollbarThumb}" />
                            <RepeatButton x:Name="VerticalLargeIncrease"
                                          Grid.Row="3"
                                          Width="0"
                                          Template="{x:Null}" />
                            <RepeatButton x:Name="VerticalSmallIncrease" Visibility="Collapsed" />
                        </Grid>
                        <Grid x:Name="HorizontalRoot"
                              Height="{TemplateBinding Height}"
                              Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <RepeatButton x:Name="HorizontalSmallDecrease" Visibility="Collapsed" />
                            <RepeatButton x:Name="HorizontalLargeDecrease"
                                          Grid.Column="1"
                                          Height="0"
                                          Template="{x:Null}" />
                            <Thumb x:Name="HorizontalThumb"
                                   Grid.Column="2"
                                   Height="{TemplateBinding Height}"
                                   MinWidth="72"
                                   Margin="{TemplateBinding Padding}"
                                   Background="{TemplateBinding Background}"
                                   Template="{StaticResource PhoneScrollbarThumb}" />
                            <RepeatButton x:Name="HorizontalLargeIncrease"
                                          Grid.Column="3"
                                          Height="0"
                                          Template="{x:Null}" />
                            <RepeatButton x:Name="HorizontalSmallIncrease" Visibility="Collapsed" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>



</ResourceDictionary>
